<template>
  <div class="person">
    <!-- 个人信息 -->
    <center-person></center-person>
    <!-- 订单管理 -->
    <center-order></center-order>
    <!-- 我的服务 -->
    <center-New></center-New>
    <!-- 猜你喜欢 -->
    <onion-like></onion-like>
    <!-- 导入详情列表 -->
    <onion-detail></onion-detail>
    <footer-tab></footer-tab>
  </div>
</template>

<script>
import centerPerson from "@/compcenter/centerPerson.vue";
import centerOrder from "@/compcenter/centerOrder.vue";
import centerNew from "@/compcenter/centerNew.vue";
import onionDetail from "@/pages/mydetail/oniondetail.vue";
import onionLike from "@/components/onionLike.vue";
import footerTab from '@/components/onionFooter.vue'

export default {
  data() {
    return {};
  },
  components: {
    centerPerson,
    centerOrder,
    centerNew,
    onionDetail,
    onionLike,
    footerTab 
  },
  created() {
    let token = sessionStorage.getItem("token");
    if (token == null) {
      this.$router.push({ path: "/login" });
    }
  },
  // beforeRouteEnter(to,from,next){
  //     let token = sessionStorage.getItem("token");
  //     console.log(token);
  // if(token == null){
  //     next({path:"/login"});
  // }
  //     // next();
  // }
};
</script>

<style lang="less">
.person {
  padding-bottom: 60px;
}
</style>